package main.java.design.strategy;

/**
 * <p>
 *     策略模式
 * </p>
 *
 * @author : wangdejian
 * @version 1.0
 * @date : 2020/6/17 22:02
 */
public class Client {

    public static void main(String[] args) {

        ContextStrategy cashNormalContext = new ContextStrategy(new CashNormal());
        cashNormalContext.contextInterface(400);

        ContextStrategy cashRebateContext = new ContextStrategy(new CashRebate(0.8));
        cashRebateContext.contextInterface(400);

        ContextStrategy cashReturnContext = new ContextStrategy(new CashReturn());
        cashReturnContext.contextInterface(400);
    }
}
